{% extends "layout.html.twig" %}
{% form_theme form 'AcmeEventBundle:Form:fields_newfeedback.html.twig' %}
{% block content %}

			<h2>Event vom {{ information_datum|date('d.m.Y') }}</h2>

			{% for flashMessage in app.session.flashbag.get('information') %}
			<div class="row">
				<div class="col-md-12" style="color:green;">
			    	{{ flashMessage }}
			    </div>
			</div>
			{% endfor %}
				<div class="row">
					<div class="col-md-12">&nbsp;</div>
				</div>
				{% if information.description is not empty %}							
				<div class="row">
					<div class="col-md-3"><strong>Apero:</strong></div>
					<div class="col-md-9">{{ information.aperolocation }}</div>
				</div>
				<div class="row">
					<div class="col-md-3" style="padding-top:5px;"><strong>Nachtessen:</strong></div>
					<div class="col-md-9">
						{% if information.location is not empty %}					
						{{ information.location }}<br />
						{% endif %}
						{% if information.street is not empty %}
						{{ information.street }}<br />
						{% endif %}
						{% if information.postcode is not empty or information.city is not empty %}
						{{ information.postcode }} {{ information.city }}
						{% endif %}
					</div>
				</div>
				{% endif %}
				{% if information.description is not empty %}
				<div class="row" style="padding-top:5px;">
					<div class="col-md-3"><strong>Kommentar:</strong></div>
					<div class="col-md-9">{{ information.description|nl2br }}</div>
				</div>
				{% else %}
					<div class="row">
						
						<div class="col-md-12">Informationen folgen noch von unserem Event Organisator {{ information.firstname }}</div>
					</div>
				{% endif %}


						
						
			{% if information.actuellInformation == 1 %} 							
			{{ form_start(form) }}
			    {{ form_errors(form) }}
				<hr/>
											
			
				<div class="row">
					<div class="col-md-12">
					    <div class="form-group">
					        {{ form_errors(form.answer) }}
					        {{ form_widget(form.answer) }}
					    </div>
					</div>
				</div>							

			    <div class="row">
			    	<div class="col-md-6">
			    		<div class="form-group">
			        		{{ form_widget(form.save, { attr: {'class':'btn btn-default'}} ) }}
			        	</div>
			        </div>
					<div class="col-md-6" style="text-align:right;">
						<a class="btn btn-default" type="button" href="{{ path('overview_events') }}">Zurück zur Übersicht</a>
					</div>
			    </div>
			
			{{ form_end(form) }}
			
			{% endif %}						
						
				{% if feedbacks|length > 0 %} 		
				<div class="row">
					<div class="col-md-12">
						<table class="table table-striped">
							<thead>
								<tr>
									<td class="col-md-3">
										<div class="feedback-datum-titel">Datum / Name</div>
									</td>
									<td class="col-md-9">
										<div class="feedback-text-titel">Kommentar</div>
									</td>
								</tr>
							</thead>
							<tbody>
								{% set showform = "" %}
								{% for feedback in feedbacks %}
								<tr>
									<td class="col-md-3">
										<div class="feedback-datum-text">{{ feedback.datum|date('d.m.Y H:i:s') }}</div>
										<div class="feedback-name-text">{{ feedback.firstname }}</div>
									</td>
									<td class="col-md-9">
										<div class="feedback-text-text">{{ feedback.answer|nl2br }}</div>
									</td>
								</tr>
								{% set showform = feedback.actuell_information %}
								{% endfor %}
								
							</tbody>
						</table>
					</div>
				</div>							
				{% endif %}		

			<!--
			<div class="row">
				<div class="col-md-12"><a class="btn btn-default" type="button" href="{{ path('overview_events') }}">Zurück zur Übersicht</a></div>
			</div>
			-->
			
{% endblock %}			